﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;
using PaketTrackerVerwaltung.PaketTrackerServer;
using PaketTrackerVerwaltung.ViewModels;

namespace PaketTrackerVerwaltung
{
    /// <summary>
    /// Interaction logic for Verlauf.xaml
    /// </summary>
    public partial class Verlauf : Window
    {
        public string PaketIdent { get; set; }

        private List<Mitarbeiter> mitarbeiter;
        
        public Verlauf()
        {
            InitializeComponent();
        }

        private void Window_Loaded(object sender, RoutedEventArgs e)
        {
            txtPaketIdent.Text = PaketIdent;
            
            PaketTrackerServer.WebservicesSoapClient client = new PaketTrackerServer.WebservicesSoapClient();
            
            //mitarbeiter = client.

            List<PaketStatusViewModel> list = new List<PaketStatusViewModel>();
            list.AddListPaketStatus(client.GetAllPaketStatus(PaketIdent).ToList());
            //List<PaketStatusViewModel> vm = new List<PaketStatusViewModel>().AddRange(list);

            data.DataContext = list; 
        }

        private void button1_Click(object sender, RoutedEventArgs e)
        {
            this.Close();
        }
    }
}
